package com.saas.sql;

public class ComInputQuery
{
  public static String company_dt_INSERT_COMPANY_INPUT = "insert company_dt(id,cust_name,province_id,province_name,logo,url,add_date,oper_time,cust_id,user_id,contact_name,validity) values(:VID,:VCUST_NAME,:VPROVINCE_ID,:VPROVINCE_NAME,:VLOGO,:VURL,now(),now(),:VCUST_ID,:VUSER_ID,:VCONTACT_NAME,:VVALIDITY)";
  public static String company_dt_SEL_COMINPUT_BY_PAGE = "select * from company_dt where cust_name like :VCUST_NAME and validity!='8' order by add_date";
  public static String company_dt_SEL_COMINPUT_BY_PAGE_MEMBER = "select * from company_dt where cust_name like :VCUST_NAME and cust_id=:VCUST_ID order by oper_time desc";
  public static String company_dt_SEL_COMINPUT_BY_PAGE_MEMBER_VALIDITY = "select * from company_dt where cust_name like :VCUST_NAME and cust_id=:VCUST_ID and validity=:VVALIDITY order by oper_time desc";
  public static String company_dt_DEL_COMPANY_INPUT = "delete from company_dt where id=:VID";
  public static String company_dt_SEL_COM_INPUT_CONTENT = "select * from company_dt where id=:VID";
  public static String company_dt_UP_COMPANY_INPUT = "update company_dt set cust_name=:VCUST_NAME,province_id=:VPROVINCE_ID,province_name=:VPROVINCE_NAME,logo=:VLOGO,url=:VURL,oper_time=now(),cust_id=:VCUST_ID,user_id=:VUSER_ID,validity=:VVALIDITY where id=:VID";
  public static String company_dt_SEL_CHECK_CODE = "select id from company_dt where cust_name=:VCUST_NAME";
  public static String company_dt_UP_COMPANY_CHECK = "update company_dt set validity=:VVALIDITY, check_user=:VCHECK_USER,check_time=now() where id=:VID";
  public static String company_dt_SEL_COMINPUT = "select * from company_dt where cust_name like :VCUST_NAME and validity ='0' and add_date between :VSTART_DATE and :VEND_DATE order by add_date";
  public static String company_dt_SEL_COMINPUT_VALIDITY = "select * from company_dt where cust_name like :VCUST_NAME and validity=:VVALIDITY and add_date between :VSTART_DATE and :VEND_DATE order by oper_time desc";
  public static String company_dt_SEL_COMINPUT3 = "select * from company_dt where cust_name like :VCUST_NAME and validity ='0' and oper_time between :VSTART_DATE and :VEND_DATE order by oper_time";
  public static String company_dt_SEL_COMINPUT_VALIDITY3 = "select * from company_dt where cust_name like :VCUST_NAME and validity=:VVALIDITY and oper_time between :VSTART_DATE and :VEND_DATE order by oper_time";
  public static String company_dt_SEL_COMINPUT2 = "select * from company_dt where cust_name like :VCUST_NAME and validity ='0' and add_date between :VSTART_DATE and :VEND_DATE order by oper_time desc";
  public static String company_dt_SEL_COMINPUT_VALIDITY2 = "select * from company_dt where cust_name like :VCUST_NAME and validity=:VVALIDITY and add_date between :VSTART_DATE and :VEND_DATE order by oper_time desc";
  public static String company_dt_SEL_COMINPUT_MANAGE = "select * from company_dt where cust_name like :VCUST_NAME and (validity ='0' or validity ='1' or validity ='2') and oper_time between :VSTART_DATE and :VEND_DATE order by oper_time desc";
  public static String company_dt_SEL_COMINPUT_MANAGE_VALIDITY2 = "select * from company_dt where cust_name like :VCUST_NAME and (validity ='0' or validity ='2') and oper_time between :VSTART_DATE and :VEND_DATE order by oper_time desc";
  public static String company_dt_SEL_COMPANY_FROM_COMPANYLIST = "select * from company_list order by add_date desc";
}

